<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateYiJingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('yi_jings', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('user_id');
            $table->tinyInteger('status')->default(0); //0-未评 1-已评

            $table->string('name',50)->nullable();//姓名
            $table->tinyInteger('sex')->default(1); //1-男 2-女
            $table->string('birth_address')->nullable();//出生地址
            $table->string('lunar_calendar')->nullable();//阴历
            $table->string('gregorian_calendar')->nullable();//阴历
            $table->string('zhongdian')->nullable();//重点咨询

            $table->tinyInteger('work_fraction')->default(0);//工作打分
            $table->tinyInteger('innovate_fraction')->default(0);//创新打分
            $table->tinyInteger('stabilize_fraction')->default(0);//稳定打分
            $table->tinyInteger('marriage_fraction')->default(0);//婚姻打分
            $table->tinyInteger('fitness_fraction')->default(0);//健康打分
            $table->tinyInteger('income_fraction')->default(0);//收入打分
            $table->tinyInteger('capacity_fraction')->default(0);//能力打分

            $table->text('work_proposal')->nullable();//工作建议
            $table->text('innovate_proposal')->nullable();//创新建议
            $table->text('stabilize_proposal')->nullable();//稳定建议
            $table->text('marriage_proposal')->nullable();//婚姻建议
            $table->text('fitness_proposal')->nullable();//健康建议
            $table->text('income_proposal')->nullable();//收入建议
            $table->text('capacity_proposal')->nullable();//能力建议
            $table->text('else_proposal')->nullable();//其他建议
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('yi_jings');
    }
}
